home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 2002 #11
/
Amiga Plus CD - 2002 - No. 11.iso
/
Tools
/
Freeware
/
DiskMaster
/
Rexx
/
DMCommAll.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
2002-10-27
|
1KB
|
62 lines
/* $VER: DMCommAll.rexx 1.3 (2.10.98) by J. Tierney
DiskMaster II Comment All v1.3
10/2/98 J. Tierney
Function: All selected files recieve the same comment.
Usage: DMCommAll.rexx
*/
OPTIONS RESULTS
IF ~SHOW('L', 'rexxreqtools.library') THEN DO
IF ~ADDLIB('rexxreqtools.library', 0, -30) THEN DO
SAY 'Could not open "rexxreqtools.library".'
EXIT 10
END
END
pub = ADDRESS()
comment = RTGETSTRING(, , 'Comment:', ,'rt_pubscrname=' || pub 'rt_reqpos=reqpos_centerscr')
comment = FixQuotes(comment)
comment = '"' || comment || '"'
IF rtresult THEN DO
DIRLIST VAR dlist SEL
STATUS P
dir = result
PRAGMA('D', dir)
DO i = 1 TO dlist.name.0
ADDRESS COMMAND 'C:FileNote' dlist.name.i comment
END
DESELECT '*'
NEWDIR dir
END
CALL REMLIB('rexxreqtools.library')
EXIT 0
/* Procedures */
FixQuotes: PROCEDURE
PARSE ARG string
x = 1
DO FOREVER
x = POS('"', string, x)
IF x ~= 0 THEN
DO
string = INSERT('*', string, x - 1)
x = x + 1
END
ELSE LEAVE
END
RETURN string